
import 'package:fish_redux/fish_redux.dart';
import 'package:school_safe_teacher/constans/constants.dart';

class BaseEntity<T> {
  int status;
  String msg;
  dynamic dataStr;
  List< dynamic> listDataStr;

  BaseEntity(this.status, this.msg);

  BaseEntity.fromJson(Map<String, dynamic> json) {
    status = json[Constants.code];
    msg = json[Constants.message];
    if (json.containsKey(Constants.data)) {
      if (json[Constants.data] is List) {
        listDataStr = json[Constants.data];
      } else {
        dataStr = json[Constants.data];
      }
    }
  }
}
